<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>测试layui</title>
    <link rel="stylesheet" href="./layui/css/layui.css">
</head>
<body>
    <p id="p" class="layui-bg-red layui-font-20 layui-font-green">段落文章</p>
    <button type="button" class="layui-btn">
        <i class="layui-icon">&#xe608;</i> 添加
      </button>
      <button type="button" class="layui-btn layui-btn-lg layui-btn-primary layui-btn-radius">大型加圆角</button>
    <script src="./layui/layui.js"></script>
    <script>
        layui.define(function(){
            let $ = layui.$;
            let form = layui.form;

            layui.data('users',{
                key:'username',value:'xiaozhang'
            });

            let users = layui.data('users');
            console.log(users.username);
            console.log(layui.device());

            console.log($("#p").text());
        })
    </script>
</body>
</html>